package com.xxxx.rpc.mapper;


import com.xxxx.rpc.pojo.Cart;
import com.xxxx.rpc.pojo.CartExample;
import com.xxxx.rpc.pojo.CartList;
import com.xxxx.rpc.pojo.CartVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CartMapper {
    long countByExample(CartExample example);

    int deleteByExample(CartExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Cart record);

    int insertSelective(Cart record);

    List<Cart> selectByExample(CartExample example);

    Cart selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Cart record, @Param("example") CartExample example);

    int updateByExample(@Param("record") Cart record, @Param("example") CartExample example);

    int updateByPrimaryKeySelective(Cart record);

    int updateByPrimaryKey(Cart record);


    //添加购物车
    Integer addCart(CartVo cartVo);

    //获取购物车列表
    List<CartList> getCartList(CartList cartList);

    //根据Id获取购物车商品的数量
    Integer getCartNumOneById(Integer goodsId);

}